//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<ResourceProvider.cpp>
///	@path	~/src/scene/resource/
///	@date	2008/04/11
///	@desc	.

#include "config/config.h"

#include "graphics/IRenderer.h"

#include "scene/resource/ResourceProvider.h"

namespace xeres {

	// ResourceProvider
	ResourceProvider::ResourceProvider( void )
		: m_renderman( NULL )
	{

	}
	// ~ResourceProvider
	ResourceProvider::~ResourceProvider( void )
	{

	}
	// Initialize
	void ResourceProvider::Initialize( RenderManager * renderman )
	{
		if( !DataManager::IsInitialized() )
			DataManager::Initialize();
		m_renderman = renderman;
	}
	// Finalize
	void ResourceProvider::Finalize( void )
	{
		DataManager::Finalize();
		m_renderman = NULL;
	}
	// QueryColorOrder
	ColorOrder ResourceProvider::QueryColorOrder( void )
	{
		return m_renderman->GetRenderer()->GetColorOrder();
	}
	// Renderer
	RefWeak<IRenderer> ResourceProvider::Renderer( void )
	{
		return m_renderman->GetRenderer();
	}

} // namespace xeres
